import React from 'react';
import { NavLink } from 'umi'
import './index.less'

const MyComponent = (props: { children: string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | null | undefined; }) => {
  return (
    <div>
      <h2>Header</h2>
      {/*<Link to={'/user/a'} >用户1</Link>*/}
      {/*<Link to={'/user/b'} >用户2</Link>*/}
      {/*<Link to={'/user/a/b'} replace >用户3</Link>   */}

      <NavLink to={'/user/a'} >用户1</NavLink>
      <NavLink to={'/user/b'} >用户2</NavLink>
      <NavLink to={'/user/a/b'} replace >用户3</NavLink>
      {props.children}
      <h2>Footer</h2>
    </div>
  );
};

export default MyComponent;
